package com.lxyk.service.monthly.impl;

import com.lxyk.dao.monthly.CourseDao;
import com.lxyk.domain.Course;
import com.lxyk.service.monthly.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName CourseServiceImpl
 * @Description TODO
 * @Author FJQ
 * @Date 2022/4/23 15:35
 * @Version 1.0
 **/
@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseDao courseDao;


    @Override
    public List<Course> saveQuery() {
        return courseDao.selectAll();
    }

    @Override
    public int insertCourse(Course course) {
        return courseDao.insert(course);
    }

    @Override
    public Course selectByKey(Integer id) {
        return courseDao.selectByPrimaryKey(id);
    }

    @Override
    public boolean updateByKey(Course course) {
        return courseDao.updateByPrimaryKey(course);
    }

    @Override
    public int deleteByKey(Integer id) {
        return courseDao.deleteByPrimaryKey(id);
    }
}
